
package generator;

import java.io.*;


public class CodeGenerator {
	private BufferedWriter buffer;

	public CodeGenerator(String fileName) {
		try {
			buffer = new BufferedWriter(new FileWriter(fileName));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	private void writeLine(String linea){
		try {
			buffer.write(linea);
			buffer.newLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}


    public void generate(String in){
        writeLine(in);
        //System.out.println(in);
    }

    public void close() {
		try {
			buffer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
